﻿using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using DXApplicationTangche.UC.订单一览新.辅料.service;
using DXApplicationTangche.UC.项目成果管理.在制品管理.service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.UC.全部工序.service
{
    public class 全部工序Service
    {

    }

    public class ProjectAchievementDTO //工序成果物
    {
        public String achievementCode { get; set; } //  辅料、质检项目、审版、发运、其他
        public String achievementContent { get; set; }  //  成果物内容
        public ProjectAchievementDTO()
        {

        }

        /// <summary>
        /// 重载 syntax
        /// </summary>
        /// <param name="achievementCode"></param>
        /// <param name="createDate"></param>
        /// <param name="achievementContent"></param>
        public ProjectAchievementDTO(string achievementCode,string achievementContent)
        {
            this.achievementCode = achievementCode;
            this.achievementContent = achievementContent;
        }
        /// <summary>
        /// 辅料相关工序提交成果物
        /// </summary>
        /// <param name="achievementCode"></param>
        /// <param name="createDate"></param>
        /// <param name="achievementContent"></param>
        public ProjectAchievementDTO(string achievementCode, List<StyleAccessoryDTO> styleAccessoryDTOs)
        {
            this.achievementCode = achievementCode;
            this.achievementContent = FunctionHelper.JsonSerialization(styleAccessoryDTOs);
        }
        /// <summary>
        /// 其他工序提交订单信息
        /// </summary>
        /// <param name="achievementCode"></param>
        /// <param name="orderCommitDTO"></param>
        public ProjectAchievementDTO(string achievementCode, OrderCommitDTO返回 orderCommitDTO)
        {
            this.achievementCode = achievementCode;
            this.achievementContent = FunctionHelper.JsonSerialization(orderCommitDTO);
        }
        /// <summary>
        /// 审版工序提交成果物
        /// </summary>
        /// <param name="achievementCode"></param>
        /// <param name="paths"></param>
        public ProjectAchievementDTO(string achievementCode, List<String> paths)
        {
            this.achievementCode = achievementCode;
            this.achievementContent = FunctionHelper.JsonSerialization(paths);
        }
        /// <summary>
        /// 质检工序提交成果物
        /// </summary>
        /// <param name="achievementCode"></param>
        /// <param name="DTO质检"></param>
        public ProjectAchievementDTO(string achievementCode, QcItemsDTO DTO质检)
        {
            this.achievementCode = achievementCode;
            this.achievementContent = FunctionHelper.JsonSerialization(DTO质检);
        }
    }
    public class Const工序
    {
        public const String accessory = "accessory";    //  辅料
        public const String qc = "qc";   //  质检项目
        public const String pattern = "pattern"; //  审版
        public const String delivery = "delivery"; //  发运
        public const String other = "other"; //  其他
    }
}
